<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:p="http://primefaces.prime.com.tr/ui"
                template="/templates/ui.xhtml">

    <ui:define name="head">
        <script type="text/javascript">
            /*function doPopupWindow(obj) {
             var pkid = obj.parentNode.parentNode.childNodes[0].innerHTML;
             popupwindow = window.open("accDetailCancelForm.xhtml?action=query&amp;pkid=" + pkid, "popupwindow", "height=600,width=800,left=200,top=100,toolbar=no,menubar=no,scrollbars=yes,location=no");
             popupwindow.focus;
             }*/
        </script>
        <style type="text/css">
            .input-col-m {
                width: 60px;
            }

            .input-col-l {
                width: 80px;
            }

            .input-col-xxl {
                width: 1%;
                text-align: right;
            }

            .col-80 {
            }

            .col-20 {
                width: 5%;
            }
        </style>

    </ui:define>

    <ui:define name="content">
        <div style="margin:5px;">
            <p:tabView style="font-weight:normal;font-style:normal" dynamic="true" cache="false">
                <p:tab title="贷款记录清单">
                    <p:growl id="msgs" showDetail="false"/>
                    <h:form id="form">
                        <p:menubar>
                            <p:menuitem type="push" value="全部发送" icon="ui-icon ui-icon-document"
                                        action="#{accDetailAction.onSend}" update="msgs,pdt"
                                        ajax="true"/>
                        </p:menubar>
                        <p:ajaxStatus style="height:18px;text-align:center">
                            <f:facet name="start">
                                <h:graphicImage value="/images/ajaxloadingbar.gif"/>
                            </f:facet>
                            <f:facet name="complete">
                                <h:outputText value=""/>
                            </f:facet>
                        </p:ajaxStatus>
                        <p:dataTable id="pdt" style="width:100%;"
                                     dynamic="true"
                                     value="#{accDetailAction.todayLoanAccDetailList}" var="record"
                                     paginatorTemplate="{FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                                     paginator="true" rows="15" paginatorPosition="bottom"
                                     rowsPerPageTemplate="100,50,30,15,5"
                                     emptyMessage="数据记录为空...">
                            <p:column style="display:none;" headerText="pkid">
                                <h:outputText value="#{record.pkId}"/>
                            </p:column>
                            <p:column headerText="监管账号" style="text-align:center" filterBy="#{record.accountCode}">
                                <h:outputText
                                        value="#{record.accountCode}"/>
                            </p:column>
                            <p:column headerText="账户名称" style="text-align:center" filterBy="#{record.accountName}">
                                <h:outputText
                                        value="#{record.accountName}"/>
                            </p:column>
                            <p:column headerText="对方账号" style="text-align:center" filterBy="#{record.toAccountCode}">
                                <h:outputText
                                        value="#{record.toAccountCode}"/>
                            </p:column>
                            <p:column headerText="对方账户名称" style="text-align:center" filterBy="#{record.toAccountName}">
                                <h:outputText
                                        value="#{record.toAccountName}"/>
                            </p:column>
                            <p:column headerText="收支标志" style="text-align:center">
                                <h:outputText
                                        value="#{accDetailCancelAction.inoutFlag.valueOfAlias(record.inoutFlag).title}"/>
                            </p:column>
                            <p:column headerText="交易类型" style="text-align:center">
                                <h:outputText
                                        value="#{accDetailCancelAction.tradeType.valueOfAlias(record.tradeType).title}"/>
                            </p:column>
                            <p:column headerText="交易金额">
                                <h:outputText value="#{record.tradeAmt}" style="float: right">
                                    <f:convertNumber type="number" pattern="#,###,###,###,##0.00"/>
                                </h:outputText>
                            </p:column>
                            <p:column headerText="交易时间" style="text-align:center">
                                <h:outputText value="#{record.tradeDate}">
                                </h:outputText>
                            </p:column>

                        </p:dataTable>
                    </h:form>
                </p:tab>
            </p:tabView>
        </div>
    </ui:define>

</ui:composition>